package design.pattern.observer.customer;

/**
 * @author futao
 * Created on 2017/11/27 - 19:16.
 * 观察者Observer  用户一旦登陆便要被通知
 */
public class DbAdmin implements UserActionSubscriber {
    /**
     *
     * @param userAction
     */
    public DbAdmin(UserAction userAction) {
        userAction.addSubscriber(this);
    }

    /**
     * 通知
     * @param userBean
     */
    public void onLoginEvent(UserBean userBean) {
        System.out.println("收到登录成功的通知");
    }
}
